package com.cfx.handler;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.cfx.service.BookService;
import com.cfx.service.UserService;

public class UserHandler {

	public static void main(String[] args) {
		
		ApplicationContext ioc = new ClassPathXmlApplicationContext("beans.xml");
		
		UserService userService = (UserService) ioc.getBean("userServiceImpl");
		BookService bookService = (BookService) ioc.getBean("bookServiceImpl");
		
		userService.add();
		userService.del();
		userService.get();
		userService.update();
		bookService.add();
		bookService.del();
		bookService.get();
		bookService.update();
	}
}
